/*
 Navicat Premium Data Transfer

 Source Server         : 测试
 Source Server Type    : SQL Server
 Source Server Version : 12002000
 Source Host           : localhost:1433
 Source Catalog        : OcelotSettings
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 12002000
 File Encoding         : 65001

 Date: 07/07/2023 17:37:34
*/


-- ----------------------------
-- Table structure for DictionaryItem
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[DictionaryItem]') AND type IN ('U'))
	DROP TABLE [dbo].[DictionaryItem]
GO

CREATE TABLE [dbo].[DictionaryItem] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [DictionaryId] int  NOT NULL,
  [Key] varchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [Value] varchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [Remark] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [Enabled] bit  NOT NULL
)
GO

ALTER TABLE [dbo].[DictionaryItem] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'主键Id',
'SCHEMA', N'dbo',
'TABLE', N'DictionaryItem',
'COLUMN', N'Id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'字典Id',
'SCHEMA', N'dbo',
'TABLE', N'DictionaryItem',
'COLUMN', N'DictionaryId'
GO

EXEC sp_addextendedproperty
'MS_Description', N'关键字',
'SCHEMA', N'dbo',
'TABLE', N'DictionaryItem',
'COLUMN', N'Key'
GO

EXEC sp_addextendedproperty
'MS_Description', N'值',
'SCHEMA', N'dbo',
'TABLE', N'DictionaryItem',
'COLUMN', N'Value'
GO

EXEC sp_addextendedproperty
'MS_Description', N'备注',
'SCHEMA', N'dbo',
'TABLE', N'DictionaryItem',
'COLUMN', N'Remark'
GO

EXEC sp_addextendedproperty
'MS_Description', N'是否启用',
'SCHEMA', N'dbo',
'TABLE', N'DictionaryItem',
'COLUMN', N'Enabled'
GO


-- ----------------------------
-- Records of DictionaryItem
-- ----------------------------
SET IDENTITY_INSERT [dbo].[DictionaryItem] ON
GO

INSERT INTO [dbo].[DictionaryItem] ([Id], [DictionaryId], [Key], [Value], [Remark], [Enabled]) VALUES (N'1', N'5', N'ocelot配置路径', N'OcelotMaster/ocelot.json', N'ocelot配置路径', N'1')
GO

INSERT INTO [dbo].[DictionaryItem] ([Id], [DictionaryId], [Key], [Value], [Remark], [Enabled]) VALUES (N'2', N'6', N'consul', N'consul', N'consul', N'1')
GO

SET IDENTITY_INSERT [dbo].[DictionaryItem] OFF
GO


-- ----------------------------
-- Auto increment value for DictionaryItem
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[DictionaryItem]', RESEED, 2)
GO


-- ----------------------------
-- Foreign Keys structure for table DictionaryItem
-- ----------------------------
ALTER TABLE [dbo].[DictionaryItem] ADD CONSTRAINT [idx_dic_dicItem] FOREIGN KEY ([DictionaryId]) REFERENCES [dbo].[Dictionary] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

